﻿using MiniFox.Components;
using MiniFox.Platform.Applications.Models;

namespace MiniFox.Platform.Applications.Providers
{
    /// <summary>
    /// 
    /// </summary>
    [AutoRegister]
    public interface IRoleProvider
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="identity"></param>
        /// <returns></returns>
        IEnumerable<SystemRole> GetUserRoles(SystemIdentity identity);
        /// <summary>
        /// 根据模块提取相关角色
        /// </summary>
        /// <param name="module"></param>
        /// <returns></returns>
        IEnumerable<SystemRole> GetModuleRoles(SystemNavModuleEntry module);
        /// <summary>
        /// 根据模块功能提取相关角色
        /// </summary>
        /// <param name="action"></param>
        /// <returns></returns>
        IEnumerable<SystemRole> GetModuleRoles(SystemNavModuleAction action);
    }
}
